package com.asynctm.android.tm.activity;

import android.view.View;
import android.widget.TextView;

import com.asynctm.android.R;
import com.asynctm.android.tm.dto.ActivityDto;

/**
 * Guarda las referencias de una row de la lista de actividades.
 * 
 * @author rockdrigo
 */
public class ActivitiesItemViewHolder {

	private TextView lblActivityName;
	private TextView lblActivityText;
	private TextView lblActivityDateTime;

	/**
	 * Inicializa un listitem
	 * @param paramView
	 */
	public ActivitiesItemViewHolder(View paramView) {
		this.lblActivityName = (TextView) paramView.findViewById(R.id.lblActivityName);
		this.lblActivityText = (TextView) paramView.findViewById(R.id.lblActivityText);
		this.lblActivityDateTime = (TextView) paramView.findViewById(R.id.lblActivityDateTime);
	}
	
	public TextView getLblActivityName() {
		return lblActivityName;
	}
	
	public TextView getLblActivityText() {
		return lblActivityText;
	}
	
	public TextView getLblActivityDateTime() {
		return lblActivityDateTime;
	}
	
	/**
	 * Pobla los datos de la fila
	 * 
	 * @param activityDto
	 */
	public void populate(ActivityDto activity) {
		lblActivityName.setText(activity.getActivityName());
		lblActivityText.setText(activity.getActivityDescription());
		lblActivityDateTime.setText(activity.getActivityDate());
	}
}
